Optimal. Leaf size=23 \[ -\frac{\log \left (a \cos ^2(e+f x)+b\right )}{2 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0308976, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4138, 260} \[ -\frac{\log \left (a \cos ^2(e+f x)+b\right )}{2 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 260
Rubi steps
\begin{align*} \int \frac{\tan (e+f x)}{a+b \sec ^2(e+f x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\log \left (b+a \cos ^2(e+f x)\right )}{2 a f}\\ \end{align*}
Mathematica [A] time = 0.173116, size = 26, normalized size = 1.13 \[ -\frac{\log (a \cos (2 (e+f x))+a+2 b)}{2 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 37, normalized size = 1.6 \begin{align*} -{\frac{\ln \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,fa}}+{\frac{\ln \left ( \sec \left ( fx+e \right ) \right ) }{fa}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.08854, size = 35, normalized size = 1.52 \begin{align*} -\frac{\log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{2 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.508049, size = 51, normalized size = 2.22 \begin{align*} -\frac{\log \left (a \cos \left (f x + e\right )^{2} + b\right )}{2 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 15.8197, size = 128, normalized size = 5.57 \begin{align*} \begin{cases} \frac{\tilde{\infty } x \tan{\left (e \right )}}{\sec ^{2}{\left (e \right )}} & \text{for}\: a = 0 \wedge b = 0 \wedge f = 0 \\\frac{\log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 a f} & \text{for}\: b = 0 \\\frac{x \tan{\left (e \right )}}{a + b \sec ^{2}{\left (e \right )}} & \text{for}\: f = 0 \\- \frac{1}{2 b f \sec ^{2}{\left (e + f x \right )}} & \text{for}\: a = 0 \\- \frac{\log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \sec{\left (e + f x \right )} \right )}}{2 a f} - \frac{\log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \sec{\left (e + f x \right )} \right )}}{2 a f} + \frac{\log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 a f} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.39131, size = 186, normalized size = 8.09 \begin{align*} -\frac{\frac{\log \left (a + b + \frac{2 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{2 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a} - \frac{2 \, \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}{a}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]